﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleTesrt.GameTestIOC
{
    internal sealed class Guai
    {
        public string Name { get; set; }
        public int HP { get; set; }
        public Guai(string name, int hp)
        {
            this.Name = name;
            this.HP = hp;
        }
        public void Attrack(int less)
        {
            if (HP<=0)
                Console.WriteLine("怪物已经死了");
            else
                HP -= less;
                if (HP>=0)
                     Console.WriteLine("怪物还剩{0}滴血",HP);
                else
                    Console.WriteLine("怪兽被你他妈的大四了");
        }
    }
}
